require('./dbInit');
const mongoose = require('mongoose');
mongoose.Promise = global.Promise;

const bizModel = {
    bizId: Number,
    bizName: String,
};

let schema = mongoose.Schema;
let bizMap = new schema(bizModel);
// projectMap.plugin(mongoosePaginate);
let bizDbModel = mongoose.model('Biz', bizMap);
bizDbModel.collection.createIndex({bizId:1}, {unique:true, dropDups:true});

module.exports = { bizModel, bizDbModel };